
import 'package:ayj_flutter_chat_app/common/configs/project_config.dart';
import 'package:flutter/material.dart';

class VideoWidget extends StatelessWidget {
  final String url;
  final String name;

  const VideoWidget({
    super.key,
    required this.url,
    required this.name,
  });

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        SizedBox(height: 15.h,),
        AppImage.rRectNetwork(
          url,
          44.r,
        ),
        SizedBox(height: 13.h,),
        Text(name,style: KStyles.commonFontWeightTextStyle(Colors.white, KDimens.font_sp15),),
      ],
    ).addContainer(
      width: 90.w,
      height: 160.h,
      decoration: BoxDecoration(
        color: Colours.color333333,
        borderRadius: BorderRadius.circular(10.r),
      ),
    );
  }
}

class VideoSmallWidget extends StatelessWidget {
  final String url;
  final String name;
  final GestureTapCallback? onTap;

  const VideoSmallWidget({
    super.key,
    required this.url,
    required this.name,
    this.onTap,
  });

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        VideoWidget(url: url, name: name),
        AppImage.assets(AppR.chat_meeting_shrink,
          width: 32.r,
          height: 32.r,
        ).addGestureDetector(onTap: onTap)
      ],
    );
  }
}